package com.fenghongzhang.day005;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;


/**
 * A simple {@link Fragment} subclass.
 */
public class ContentFragment extends Fragment {

    public ContentFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View inflate = inflater.inflate(R.layout.fragment_content, container, false);
        TextView textView = inflate.findViewById(R.id.text1);

        Bundle arguments = getArguments();
        String input = arguments.getString("input");
        textView.setText(input);

        Toast.makeText(getActivity(), input, Toast.LENGTH_SHORT).show();


        return inflate;
    }
}
